﻿@model HitModel

@{
    ViewBag.Title = "Day " + Model.Date.ToString("yyyy.MM.dd.");
}

<h2>Hits on day: @Model.Date.ToString("yyyy.MM.dd.")</h2>

@using (Html.BeginForm("Create", "Hit", FormMethod.Get))
{
    @Html.Hidden("date", Model.Date)
    <div>@Html.DropDownList("stat", (SelectList)ViewData["StatList"])</div>
    <button type="submit">New Hit</button>
}
@foreach (Hit h in Model.Hits) {
    @Html.ActionLink(h.Stat.Name, "Index", new { hit = h.Id })<br />
    foreach (HitComponent hitComponent in h.HitComponents)
    {
        <p>@(hitComponent.Quantity.Name):
        @hitComponent.Amount 
        @hitComponent.Quantity.Unit.Abbreviation</p>
    }
}
